package org.zhongyin.DesignPattern.AbstractFactory;

public class ColorFactory extends AbstractFactory{
	public Color getColor(String colorType){
		if(colorType == null){
			return null;
		}
		
		if(colorType.equalsIgnoreCase("Red")){
			return new Red();
		}
		else if(colorType.equalsIgnoreCase("Green")){
			return new Green();
		}
		else if(colorType.equalsIgnoreCase("Yellow")){
			return new Yellow();
		}
		else{
			return null;
		}
	}

	@Override
	public Shape getShape(String shape) {
		// TODO Auto-generated method stub
		return null;
	}
}
